<?php
namespace app\branch\model;

use think\Model;
use app\common\traits\model\TraitModel;

class Cards extends Model
{
    use TraitModel;
    protected $table = 'cards';

    public function caravans()
    {
    	return $this->belongsTo('Caravancontrols','id');
    }
    public function getCardLists($querys = [])
    {
        return $this->getInfoList($querys);
    }
    public function getCardInfo($id)
    {
        return $this->where('id',$id)->find();
    }
    public function getStatus($value)
    {
        $status = ['1'=>'已绑定','0'=>'未绑定'];
        return $status[$value];
    }
}